<template>
    <view class="page">
        <Header> </Header>
        <div class="info">
            <div class="mx">
                <div v-html="info.content"></div>
            </div>
        </div>
    </view>
</template>

<script>
import $ from "@/common";
export default {
    data() {
        return {
            id: "",
            info: {},
        };
    },
    methods: {
        getDetail() {
            let url = $.index("single");
            let data = {
                Id: this.id,
            };
            $.post(url, data).then((res) => {
                if (res.isError) {
                    return;
                }
                res.content = res.content.replace(
                    /src="\/course\/admin\/kindeditor\//gi,
                    'style="max-width:100%;" src="' +
                        $.domain +
                        "/admin/kindeditor/"
                );
                this.info = res;
            });
        },
    },
    onLoad(op) {
        this.id = op.id;
        this.getDetail();
    },
};
</script>

<style lang="less" scoped>
.page {
    width: 100vw;
    height: 100vh;
    background: #fafafa;
}
</style>

